package com.matt.sooncleaner.wifiscan

import android.annotation.SuppressLint
import android.content.Context
import android.os.Bundle
import android.view.Gravity
import android.view.View
import android.widget.FrameLayout.LayoutParams
import androidx.activity.ComponentDialog
import com.matt.sooncleaner.R
import com.matt.sooncleaner.arch.dp

class WifiDisconnectTipDialog(context: Context) :
    ComponentDialog(context, R.style.DialogTheme) {

    @SuppressLint("MissingInflatedId")
    override fun onCreate(savedInstanceState: Bundle?) {
        super.onCreate(savedInstanceState)
        setContentView(R.layout.dialog_wifi_disconnect)
        findViewById<View>(R.id.okbtn).setOnClickListener {
            dismiss()
        }
        window?.attributes?.let {
            it.width = LayoutParams.MATCH_PARENT
            it.height = LayoutParams.WRAP_CONTENT
            it.gravity = Gravity.CENTER
        }
    }
}